<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>编辑顾客 - 餐厅管理系统</title>
    <style>
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body { font-family: 'Microsoft YaHei', Arial, sans-serif; background: #f5f5f5; }
        .container { max-width: 800px; margin: 0 auto; padding: 20px; }
        .header { background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%); 
                  color: white; padding: 30px; border-radius: 10px; margin-bottom: 30px; text-align: center; }
        .form-container { background: white; padding: 40px; border-radius: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
        .form-group { margin-bottom: 25px; }
        .form-group label { display: block; margin-bottom: 8px; color: #333; font-weight: 500; }
        .form-group input { width: 100%; padding: 12px; border: 2px solid #e2e8f0; 
                            border-radius: 6px; font-size: 14px; transition: all 0.3s; }
        .form-group input:focus { outline: none; border-color: #f6ad55; box-shadow: 0 0 0 3px rgba(246,173,85,0.1); }
        .form-group input:disabled { background: #f7fafc; color: #718096; }
        .form-actions { display: flex; gap: 15px; justify-content: center; margin-top: 30px; }
        .btn { padding: 12px 30px; border: none; border-radius: 6px; cursor: pointer; 
               font-size: 16px; transition: all 0.3s; }
        .btn-warning { background: #f6ad55; color: white; }
        .btn-warning:hover { background: #ed8936; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(246,173,85,0.3); }
        .btn-secondary { background: #718096; color: white; text-decoration: none; display: inline-block; }
        .btn-secondary:hover { background: #4a5568; }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>✏️ 编辑顾客信息</h1>
        </div>

        <div class="form-container">
            <form th:action="@{/customers/edit}" th:object="${customer}" method="post">
                <input type="hidden" th:field="*{id}">
                
                <div class="form-group">
                    <label for="id">顾客ID</label>
                    <input type="text" id="id" th:value="*{id}" disabled>
                </div>

                <div class="form-group">
                    <label for="name">姓名 *</label>
                    <input type="text" id="name" th:field="*{name}" required placeholder="请输入顾客姓名">
                </div>

                <div class="form-group">
                    <label for="phone">电话</label>
                    <input type="text" id="phone" th:field="*{phone}" placeholder="请输入联系电话">
                </div>

                <div class="form-group">
                    <label for="email">邮箱</label>
                    <input type="email" id="email" th:field="*{email}" placeholder="请输入电子邮箱">
                </div>

                <div class="form-actions">
                    <button type="submit" class="btn btn-warning">💾 更新</button>
                    <a th:href="@{/customers/list}" class="btn btn-secondary">❌ 取消</a>
                </div>
            </form>
        </div>
    </div>
</body>
</html>
